<template>
	<div class="demo-datetime-picker">
	    <div class="block">
	      <span class="demonstration">开播时间</span>
	      <el-date-picker
	        v-model="value1"
	        type="datetime"
	        placeholder="选择时间"
	      />
	    </div>
	    <el-button size="mini" type="primary" @click="submit">确定</el-button>
	  </div>

</template>

<script lang="ts">
	import dayjs from "dayjs";
	var datas;
	import {
		ElMessageBox,
		ElMessage
	} from 'element-plus'
	export default {
		data() {
			return {
				images:"",
				value1:""
			}
		},
		mounted() {
			this.getData();
		    //this.value1 =dayjs() ;
		},
		methods: {
		 async	submit({data}){
				
			await	this.$http.post("/index.php/index/Userinfo/timeset",{tokenid:'nf2021113012336899abc',times:this.value1})
			this.getData();
			},
		
			getData() {
				
				this.$http.get("/index.php/index/Userinfo/timeset",{tokenid:'666ffnf2021113012336899abc'}).then(data => {   
					console.log(data)
						this.value1=data[0].times
				})
			},

			handleAvatarSuccess(file) {

				this.form.image = file.data;
			},



		}
	}
</script>
<style type="text/css">
	/* .el-upload{
		width: 150px;
		min-height: 150px;
		display: flex !important;
		justify-content: center;
		align-items: center;
		border: 1px solid black;
	} */
</style>
